import axios from '@/request/http';
import base from "../base";
// import QS from 'qs';

const message = {

    // 常用 CRUD
    // 获取所有数据
    getAll(){
        return axios.get(`${base.sq}/message`)
    },
    messageAdd(message){
        return axios.post(`${base.sq}/message`,{
            ...message
        })
    },
    messagePatch(id , message){
        return axios.patch(`${base.sq}/message/${id}`,{
            ...message
        })
    },
    messageDelete(id){
        return axios.delete(`${base.sq}/message/${id}`);
    },
}

export default message;
